package com.zane.ai;

import dev.langchain4j.model.openai.OpenAiChatModel;

/**
 * @author Zane
 * @version 1.0
 * @description: TODO
 * @date 2025/6/22 23:16
 */
public class App {
    public static void main(String[] args) {
        System.out.println("Hello World!");
        OpenAiChatModel model = OpenAiChatModel.builder()
                .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
                .apiKey(System.getenv("API_KEY_ALiBaiLian"))
                .modelName("qwen-plus")
                .logRequests(true)
                .logResponses(true)
                .build();

        String result = model.chat("你谁呢");

        System.out.println(result);
    }
}
